package cn.edu.ujs.coor.request;

import lombok.Data;

@Data
public class PageRequest {

    private String userId;

    private String organizationId;

    private int pageSize;

    private int page;

    private String sortInfo;

    private boolean loadAll=false;

    /**
     * @return
     */
    public int getIndex() {
        return (page <= 0 ? 0 : page-1)*getSize();
    }

    public int getSize() {
        return pageSize <= 0 || pageSize > 100 ? 10 : pageSize;
    }

}